package com.hk.webapp.dao;

import com.hk.webapp.bean.CmsArticle;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CmsArticleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CmsArticle record);

    int insertSelective(CmsArticle record);

    CmsArticle selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CmsArticle record);

    int updateByPrimaryKey(CmsArticle record);

    List<CmsArticle> searchPageList(@Param("category_ids") List<Integer> category_ids,@Param("keyword") String keyword);

    CmsArticle getEntityByCode(@Param("code") String code,@Param("notId") Integer notId);

    int softDelByIds(@Param("ids") List<Integer> ids);

    List<CmsArticle> getPageListByCateIdAndState(@Param("category") Integer category,@Param("state") Integer state);

    List<CmsArticle> getPageListByCodeIdAndState(@Param("code") String code,@Param("state") Integer state);

    List<CmsArticle> getEntityListByRelId(@Param("relId") Integer relId,@Param("notId") Integer notId);

    List<CmsArticle> searchPageListByKey(@Param("cateIds") List<Integer> cateIds, @Param("key") String key);

    int getCount();
}